<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

/**
 * App\UserWithdraw
 *
 * @property int $id
 * @property string|null $bank_code
 * @property int|null $bank_type
 * @property string|null $result_message 拒绝理由
 * @property string|null $status 0 申请中 1 已打款  2 拒绝
 * @property int|null $user_id
 * @property \Carbon\Carbon|null $created_at
 * @property \Carbon\Carbon|null $updated_at
 * @property float|null $price 提现金额 单位为分
 * @method static \Illuminate\Database\Eloquent\Builder|\App\UserWithdraw whereBankCode($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\UserWithdraw whereBankType($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\UserWithdraw whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\UserWithdraw whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\UserWithdraw wherePrice($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\UserWithdraw whereResultMessage($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\UserWithdraw whereStatus($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\UserWithdraw whereUpdatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\UserWithdraw whereUserId($value)
 * @mixin \Eloquent
 * @property string|null $user_name 开户名
 * @method static \Illuminate\Database\Eloquent\Builder|\App\UserWithdraw whereUserName($value)
 * @property string|null $bank_name
 * @method static \Illuminate\Database\Eloquent\Builder|\App\UserWithdraw whereBankName($value)
 */
class UserWithdraw extends Model
{
    protected $table = "user_withdraws";
    const STATUS_PENDING = 'pending';//申请中
    const STATUS_SUBMIT = 'submit';//已打款
    const STATUS_PEOPLE = 'people';//人工打款
    const STATUS_REFUSE = 'refuse';
    public static $statusMap = [
        self::STATUS_PENDING => '申请中',
        self::STATUS_SUBMIT => '已打款',
        self::STATUS_PEOPLE => '人工打款',
        self::STATUS_REFUSE => '驳回',
    ];
    public static $statusMapMobile = [
        self::STATUS_PENDING => '申请中',
        self::STATUS_SUBMIT => '已打款',
        self::STATUS_PEOPLE => '已打款',
        self::STATUS_REFUSE => '驳回',
    ];
    public static $bankMap =
        [
        'BOC' => '中国银行',
        'COMM' => '交通银行',
        'ICBC' => '工商银行',
        'ABC' => '农业银行',
        'CCB' => '建设银行',
        'CMB' => '招商',
        'PSBC' => '邮政银行',
        'SPDB' => '浦发银行',
        'CMBC' => '民生银行',
        'CIB' => '兴业银行 ',
        'SPABANK' => '平安银行',
        'CITIC' => '中信银行 ',
        'GDB' => '广发银行',
        'CEBBANK' => '光大银行',
        'NBBANK' => '宁波银行 ',
            ];
}
